<?php
require_once '../config.php'; 
require_once '../Tools.class.php'; 
require_once '../Library.class.php'; 
require_once '../Score.class.php'; 
require_once '../Super.class.php'; 
require_once '../Courses.class.php'; 
require_once '../News.class.php'; 
require_once '../BossMail.class.php'; 

$action=$_GET['action'];
$opid=$_GET['opid'];
$body=$_SERVER['QUERY_STRING'];
Tools::wxLog($opid,$body,$action);
if(trim($opid)=='')die('Who you are?');
switch($action){
    case 'libgh'://图书归还查询
        $lib=new Library();
        echo $lib->getGHCX_more($opid);
        break;
    case 'libxj'://图书续借
        $kzh=$_GET['kzh'];
        $mc=$_GET['mc'];
        $lib=new Library();
        echo $lib->setTSXJ($kzh,$opid,$mc);
        break;
    case 'cjcx'://成绩查询
        $xn=$_GET['xn'];
        $xq=$_GET['xq'];
        $s=new Score();
        echo $s->getScore_more($opid,$xn,$xq);
        break;
    case 'tsjs'://图书检索
        $k=$_GET['txtTm'];
        $lib=new Library();
        echo $lib->getSearch($opid,$k);
        break;
    case 'xxcx'://人员搜索
        $a=$_GET['a'];
        $b=$_GET['b'];
        $c=$_GET['c'];
        $code=$_GET['code'];
        $super=new Super();
        echo $super->SearchStudent($a,$b,$c,$opid,$code);
        break;
    case 'xsxx'://学生信息
        $xh=$_GET['xh'];
        $super=new Super();
        echo $super->getStudentInfo($xh);
        break;
    case 'txlb'://同学列表
        $xkkh=$_GET['xkkh'];
        $c=new Courses();
        echo $c->getClassMateList($xkkh);
        break;
    case 'news'://新闻列表
        $p=$_GET['p'];
        $n=new News();
        echo $n->getWebNewsList($p,$opid);
        break;
    case 'maillist'://邮件列表
        $p=$_GET['p'];
        $bm=new BossMail();
        echo $bm->getWebMailList($p,$opid);
        break;
    case 'mailbody'://邮件内容
        $id=$_GET['id'];
        $bm=new BossMail();
        echo $bm->getWebMail($id,$opid);
        break;
    default:
}
?>